#ifndef FLOWMETER_H
#define FLOWMETER_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include <QMetaEnum>
#include "devicelist.h"
#include "hj212.h"
namespace Moolink {

class Flowmeter : public QObject
{
    Q_OBJECT

public:

    enum protocolList{
        Error=0,
        A,
        B,
        C,
        D,
        LDZ6
    };


    Q_ENUM(protocolList)

    static QByteArray getReadCmd(Device *device,int funCode);
    //static QString getDataResultStr(QString protocol,int commAddr,QString recvData);
    static QString getDataResultStr(Device *device,QByteArray responseData);


signals:



public slots:



private:

    static int getCrc(QString Str,int startIndex,int length);
};
}
#endif // FLOWMETER_H
